home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Palettes
/
PSAction
/
palette.make
< prev
next >
Wrap
Text File
|
1995-06-12
|
5KB
|
144 lines
#
# palette.make
#
# Inputs from Makefile.preamble (no defaults):
# OTHER_CFLAGS - Flags passed to compiler (in addition to -g, -O, etc.)
# PALETTELDFLAGS - Additional flags passed to ld when linking palettes
# OTHER_LDFLAGS - Flags passed to ld (in addition to -ObjC, etc.)
# OTHER_OFILES - Additional relocatables that may be linked in
# OTHER_PRODUCT_DEPENDS - Other dependencies of this project
# OTHER_SOURCEFILES - Other source files maintained by .pre/postamble
# OTHER_GARBAGE - Additional files to be removed by make 'clean'
# PRECOMPS - Precompiled headers that should be built before compilation
# OTHER_INITIAL_TARGETS - Targets to be built before subprojects, etc.
#
# MSGFILES - .msg files that should have msgwrap run on them
# DEFSFILES - .defs files that should have mig run on them
# MIGFILES - .mig files (no .defs files) that should have mig run on them
#
# DSTROOT - Virtual root directory prepended to $(INSTALLDIR)
#
# Inputs from Makefile.preamble (with defaults set here or in common.make):
# NORMAL_CFLAGS - Flags passed to compiler in normal compiles
# MAKEFILES - Makefiles this project depends on (default = Makefile)
# DEFAULT_CFLAGS - All compiler flags for this level (default set below)
#
# Inputs from Makefile (avoid setting these, ProjectBuilder controls them):
# NAME - name of application
# LANGUAGE - langage in which the project is written (default "English")
# LOCAL_RESOURCES - localized resources (e.g. nib's, images) of project
# GLOBAL_RESOURCES - non-localized resources of project
#
# CLASSES - Class implementation files in project.
# HFILES - Header files in project.
# MFILES - Other Objective-C source files in project.
# CFILES - Other C source files in project.
# PSWFILES - .psw files in the project
# PSWMFILES - .pswm files in the project
# SUBPROJECTS - Subprojects of this project
# BUNDLES - Bundle subprojects of this project
# OTHERSRCS - Other miscellaneous sources of this project
# OTHERLINKED - Source files not matching a standard source extention
# OTHERLINKEDOFILES - Other relocatable files to (always) link in.
# APP_MAKEFILE_DIR - Directory in which to find generic set of Makefiles
# MAKEFILEDIR - Directory in which to find $(MAKEFILE)
# MAKEFILE - Top level mechanism Makefile (e.g., app.make, bundle.make)
APP_MAKEFILE_DIR = /NextDeveloper/Makefiles/app
include $(APP_MAKEFILE_DIR)/common.make
include $(APP_MAKEFILE_DIR)/specialrules.make
all palette::
@($(process_target_archs)_obj ; \
$(set_bundle_ext) ; \
if [ "$(ENGLISH)" = "YES" -o "$(JAPANESE)" != "YES" ] ; then \
language_cflags='' ; \
else \
language_cflags='-DKANJI' ; \
fi ; \
$(MAKE) project \
"OFILE_DIR = $(OBJROOT)/$$obj_dir" \
"PROJ_CFLAGS = $(NORMAL_CFLAGS) $$language_cflags" \
"MAKEFILEDIR = $(MAKEFILEDIR)" \
"BUNDLE_EXTENSION = $$bundle_ext" \
"RC_CFLAGS = $$arch_cflags" \
"RC_ARCHS = $$archs" \
"SRCROOT = $(SRCROOT)" \
"OBJROOT = $(OBJROOT)" \
"PRODUCT_ROOT = $(SYMROOT)/$(NAME).palette" \
"SYMROOT = $(SYMROOT)/sym" \
"SYM_DIR = $(SYMROOT)/sym" )
debug::
@($(process_target_archs)_debug_obj ; \
$(set_bundle_ext) ; \
if [ "$(ENGLISH)" = "YES" -o "$(JAPANESE)" != "YES" ] ; then \
language_cflags='' ; \
else \
language_cflags='-DKANJI' ; \
fi ; \
$(MAKE) project \
"OFILE_DIR = $(OBJROOT)/$$obj_dir" \
"PROJ_CFLAGS = $(DEBUG_CFLAGS) $$language_cflags" \
"MAKEFILEDIR = $(MAKEFILEDIR)" \
"BUNDLE_EXTENSION = $$bundle_ext" \
"RC_CFLAGS = $$arch_cflags" \
"RC_ARCHS = $$archs" \
"SRCROOT = $(SRCROOT)" \
"OBJROOT = $(OBJROOT)" \
"PRODUCT_ROOT = $(SYMROOT)/$(NAME).palette" \
"SYMROOT = $(SYMROOT)/sym" \
"SYM_DIR = $(SYMROOT)/sym" )
project:: $(INITIAL_TARGETS) subprojs bundles tools \
resources $(PRODUCT_ROOT)/$(NAME)
$(PRODUCT_ROOT):
@$(MKDIRS) $(PRODUCT_ROOT)
TEMP_C_FILE = $(SYM_DIR)/$(NAME).c
$(PRODUCT_ROOT)/$(NAME): $(OFILE_DIR) $(PRODUCT_DEPENDS) $(PRODUCT_ROOT)
@(if [ "`$(ECHO) $(OFILES) $(OTHER_OFILES) | wc -w`" != " 0" ] ; \
then \
cmd="$(CC) -nostdlib $(ALL_CFLAGS) -r $(PALETTELDFLAGS) -o $(PRODUCT_ROOT)/$(NAME) $(OFILES) $(OTHER_OFILES) $(OTHERLINKED)" ; \
echo $$cmd ; $$cmd ; \
else \
$(ECHO) Warning: Building empty palette. ; \
$(RM) -f $(TEMP_C_FILE) ; \
$(TOUCH) $(TEMP_C_FILE) ; \
$(CC) $(CFLAGS) $(OTHER_CFLAGS) $(RC_CFLAGS) -c $(TEMP_C_FILE) -o $(PRODUCT_ROOT)/$(NAME) ; \
$(RM) -f $(TEMP_C_FILE) ; \
fi ; \
$(CHMOD) a+x $(PRODUCT_ROOT)/$(NAME) )
$(DSTROOT)$(INSTALLDIR):
@$(MKDIRS) $(DSTROOT)$(INSTALLDIR)
before_install:: $(DSTROOT)$(INSTALLDIR)
$(RM) -rf $(DSTROOT)$(INSTALLDIR)/$(NAME).palette
after_install::
install:: palette before_install installhdrs $(OTHER_INSTALL_DEPENDS)
(cd $(SYMROOT); $(TAR) chf - $(NAME).palette) | (cd $(DSTROOT)$(INSTALLDIR); $(TAR) xf -)
$(STRIP) $(RELOCATABLE_STRIP_OPTS) $(DSTROOT)$(INSTALLDIR)/$(NAME).palette/$(NAME)
@($(process_target_archs)_obj ; \
$(MAKE) after_install "DSTROOT=$(DSTROOT)" \
"OBJROOT=$(OBJROOT)" \
"SYMROOT=$(SYMROOT)" \
"INSTALLDIR = $(INSTALLDIR)" \
"PRODUCT_ROOT = $(SYMROOT)/$(NAME).palette" \
"SYM_DIR = $(SYMROOT)/sym" \
"OFILE_DIR = $(OBJROOT)/$$obj_dir" \
"PROJ_CFLAGS = $(NORMAL_CFLAGS)" \
"APP_MAKEFILE_DIR = $(APP_MAKEFILE_DIR)" \
"RC_CFLAGS = $$arch_cflags" \
"RC_ARCHS = $$archs" )
depend:: Makefile.dependencies $(SUBPROJECTS:.subproj=.depend) $(BUNDLES:.bproj=.depend) $(TOOLS:.tproj=.depend)